[FORMAT "WCOFF"]
[INSTRSET "i486p"]
[OPTIMIZE 1]
[OPTION 1]
[BITS 32]
[FILE "jpeg.c"]
[SECTION .text]
	GLOBAL	_info_JPEG
_info_JPEG:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	MOV	EDI,DWORD [8+EBP]
	PUSH	EBX
	MOV	EAX,DWORD [20+EBP]
	MOV	ESI,DWORD [12+EBP]
	LEA	EBX,DWORD [512+EDI]
	MOV	DWORD [23520+EBX],EAX
	ADD	EAX,DWORD [16+EBP]
	MOV	DWORD [23524+EBX],EAX
	PUSH	EBX
	CALL	_jpeg_init
	POP	EDX
	XOR	EDX,EDX
	TEST	EAX,EAX
	JNE	L1
	CMP	DWORD [512+EDI],0
	JNE	L3
	XOR	EDX,EDX
L1:
	LEA	ESP,DWORD [-12+EBP]
	MOV	EAX,EDX
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L3:
	MOV	DWORD [ESI],2
	MOV	EDX,1
	MOV	DWORD [4+ESI],0
	MOV	EAX,DWORD [512+EDI]
	MOV	DWORD [8+ESI],EAX
	MOV	EAX,DWORD [4+EBX]
	MOV	DWORD [12+ESI],EAX
	JMP	L1
	GLOBAL	_decode0_JPEG
_decode0_JPEG:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	ECX
	MOV	ESI,DWORD [8+EBP]
	MOV	EAX,DWORD [16+EBP]
	MOV	EDI,DWORD [20+EBP]
	LEA	EBX,DWORD [512+ESI]
	MOV	DWORD [23520+EBX],EAX
	ADD	EAX,DWORD [12+EBP]
	MOV	DWORD [23524+EBX],EAX
	LEA	EAX,DWORD [24052+ESI]
	PUSH	EAX
	CALL	_jpeg_idct_init
	PUSH	EBX
	CALL	_jpeg_init
	MOV	EAX,DWORD [28+EBP]
	MOV	EDX,EDI
	AND	EDX,127
	MOV	ECX,EDX
	CDQ
	IDIV	ECX
	MOV	EDX,DWORD [512+ESI]
	MOV	DWORD [-16+EBP],EAX
	ADD	EAX,EDX
	MOV	DWORD [23536+EBX],EAX
	PUSH	EDI
	PUSH	DWORD [24+EBP]
	PUSH	EBX
	CALL	_jpeg_decode
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	XOR	EAX,EAX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
	GLOBAL	_get_bits
_get_bits:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	ESI
	MOV	EBX,DWORD [8+EBP]
	MOV	EDX,DWORD [23532+EBX]
	MOV	ESI,DWORD [23528+EBX]
	CMP	EDX,16
	JG	L15
L13:
	MOV	EAX,DWORD [23520+EBX]
	MOV	EDI,DWORD [23524+EBX]
	MOV	WORD [-16+EBP],0
	CMP	EAX,EDI
	JAE	L10
	MOV	CL,BYTE [EAX]
	MOV	BYTE [-13+EBP],CL
	LEA	ECX,DWORD [1+EAX]
	MOV	DWORD [23520+EBX],ECX
	CMP	BYTE [-13+EBP],-1
	JE	L16
L11:
	SAL	ESI,8
	ADD	EDX,8
	MOVZX	EAX,BYTE [-13+EBP]
	OR	ESI,EAX
	CMP	EDX,16
	JLE	L13
L15:
	MOV	EDI,EDX
	MOV	EAX,1
	SUB	EDI,DWORD [12+EBP]
	MOV	EDX,ESI
	MOV	DWORD [23528+EBX],ESI
	MOV	ECX,EDI
	SHR	EDX,CL
	MOV	CL,BYTE [12+EBP]
	MOV	DWORD [23532+EBX],EDI
	SAL	EAX,CL
	DEC	EAX
	AND	EAX,EDX
	MOV	WORD [-16+EBP],AX
L10:
	MOVZX	EAX,WORD [-16+EBP]
	POP	EBX
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L16:
	MOV	WORD [-16+EBP],0
	CMP	ECX,EDI
	JAE	L10
	ADD	EAX,2
	MOV	DWORD [23520+EBX],EAX
	JMP	L11
	GLOBAL	_jpeg_sof
_jpeg_sof:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	EAX
	MOV	EBX,DWORD [8+EBP]
	MOV	ECX,DWORD [23520+EBX]
	MOV	EDI,DWORD [23524+EBX]
	LEA	ESI,DWORD [8+ECX]
	CMP	ESI,EDI
	JA	L19
	MOVZX	EAX,BYTE [3+ECX]
	MOVZX	EDX,BYTE [4+ECX]
	SAL	EAX,8
	OR	EAX,EDX
	MOV	DWORD [4+EBX],EAX
	MOVZX	EAX,BYTE [5+ECX]
	MOVZX	EDX,BYTE [6+ECX]
	SAL	EAX,8
	OR	EAX,EDX
	MOV	DWORD [EBX],EAX
	MOVZX	ECX,BYTE [7+ECX]
	IMUL	EAX,ECX,3
	MOV	DWORD [-16+EBP],ECX
	MOV	DWORD [24+EBX],ECX
	LEA	EAX,DWORD [EAX+ESI*1]
	MOV	DWORD [23520+EBX],ESI
	CMP	EAX,EDI
	JA	L19
	XOR	ECX,ECX
	CMP	ECX,DWORD [-16+EBP]
	JGE	L29
L27:
	MOV	ESI,DWORD [23520+EBX]
	MOVZX	EAX,BYTE [ESI]
	MOV	DWORD [28+EBX+ECX*4],EAX
	MOV	DL,BYTE [1+ESI]
	MOVZX	EAX,DL
	MOV	DWORD [40+EBX+ECX*4],EAX
	MOV	AL,DL
	SHR	AL,4
	AND	EDX,15
	MOVZX	EAX,AL
	MOV	DWORD [52+EBX+ECX*4],EAX
	MOV	DWORD [64+EBX+ECX*4],EDX
	CMP	DWORD [16+EBX],EAX
	JGE	L25
	MOV	DWORD [16+EBX],EAX
L25:
	CMP	DWORD [20+EBX],EDX
	JGE	L26
	MOV	DWORD [20+EBX],EDX
L26:
	MOVZX	EAX,BYTE [2+ESI]
	MOV	DWORD [76+EBX+ECX*4],EAX
	INC	ECX
	LEA	EAX,DWORD [3+ESI]
	CMP	ECX,DWORD [-16+EBP]
	MOV	DWORD [23520+EBX],EAX
	JL	L27
L29:
	XOR	EAX,EAX
L17:
	POP	EDI
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L19:
	MOV	DWORD [23520+EBX],EDI
	MOV	EAX,1
	JMP	L17
	GLOBAL	_jpeg_dqt
_jpeg_dqt:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	ECX
	MOV	EDI,DWORD [8+EBP]
	MOV	EDX,DWORD [23520+EDI]
	MOV	ESI,DWORD [23524+EDI]
	LEA	ECX,DWORD [2+EDX]
	CMP	ECX,ESI
	JA	L32
	MOVZX	EAX,BYTE [EDX]
	SAL	EAX,8
	MOVZX	EDX,BYTE [1+EDX]
	OR	EAX,EDX
	MOV	DWORD [23520+EDI],ECX
	LEA	EBX,DWORD [-2+EAX]
	LEA	EAX,DWORD [EBX+ECX*1]
	CMP	EAX,ESI
	JA	L32
	TEST	EBX,EBX
	JLE	L52
L50:
	MOV	EAX,DWORD [23520+EDI]
	MOV	ESI,7
	DEC	EBX
	MOV	DL,BYTE [EAX]
	INC	EAX
	AND	ESI,EDX
	MOV	DWORD [23520+EDI],EAX
	CMP	ESI,DWORD [17348+EDI]
	JLE	L37
	MOV	DWORD [17348+EDI],ESI
L37:
	AND	EDX,248
	MOV	DWORD [-16+EBP],0
	JE	L49
L43:
	MOV	EAX,ESI
	MOV	EDX,DWORD [23520+EDI]
	SAL	EAX,6
	ADD	EAX,DWORD [-16+EBP]
	MOVZX	ECX,BYTE [EDX]
	ADD	EDX,2
	INC	DWORD [-16+EBP]
	MOV	DWORD [16580+EDI+EAX*4],ECX
	MOV	DWORD [23520+EDI],EDX
	CMP	DWORD [-16+EBP],63
	JLE	L43
	ADD	EBX,-128
L34:
	TEST	EBX,EBX
	JG	L50
L52:
	XOR	EAX,EAX
L30:
	POP	EDX
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L49:
	MOV	EAX,ESI
	MOV	EDX,DWORD [23520+EDI]
	SAL	EAX,6
	ADD	EAX,DWORD [-16+EBP]
	MOVZX	ECX,BYTE [EDX]
	INC	EDX
	INC	DWORD [-16+EBP]
	MOV	DWORD [16580+EDI+EAX*4],ECX
	MOV	DWORD [23520+EDI],EDX
	CMP	DWORD [-16+EBP],63
	JLE	L49
	SUB	EBX,64
	JMP	L34
L32:
	MOV	DWORD [23520+EDI],ESI
	MOV	EAX,1
	JMP	L30
	GLOBAL	_jpeg_dht
_jpeg_dht:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,92
	MOV	EDI,DWORD [8+EBP]
	MOV	EDX,DWORD [23520+EDI]
	LEA	ECX,DWORD [2+EDX]
	CMP	ECX,DWORD [23524+EDI]
	JA	L59
	MOVZX	EAX,BYTE [EDX]
	SAL	EAX,8
	MOVZX	EDX,BYTE [1+EDX]
	OR	EAX,EDX
	MOV	DWORD [23520+EDI],ECX
	SUB	EAX,2
	MOV	DWORD [-100+EBP],EAX
	TEST	EAX,EAX
	JLE	L95
L93:
	MOV	EDX,DWORD [23520+EDI]
	LEA	EAX,DWORD [17+EDX]
	CMP	EAX,DWORD [23524+EDI]
	JA	L59
	MOV	DL,BYTE [EDX]
	XOR	ECX,ECX
	MOV	AL,DL
	AND	EDX,15
	SHR	AL,4
	MOVZX	EAX,AL
	IMUL	EAX,EAX,3084
	IMUL	EDX,EDX,1028
	LEA	EAX,DWORD [EAX+EDI*1]
	MOV	DWORD [-96+EBP],0
	LEA	EBX,DWORD [17352+EDX+EAX*1]
	MOV	EDX,1
L73:
	MOV	EAX,DWORD [23520+EDI]
	XOR	ESI,ESI
	MOVZX	EAX,BYTE [EDX+EAX*1]
	ADD	DWORD [-96+EBP],EAX
	MOV	DWORD [-92+EBP+EDX*4],EAX
	CMP	ESI,EAX
	JGE	L99
	LEA	EAX,DWORD [516+EBX+ECX*1]
L72:
	MOV	BYTE [EAX],DL
	INC	ESI
	INC	EAX
	INC	ECX
	CMP	ESI,DWORD [-92+EBP+EDX*4]
	JL	L72
L99:
	INC	EDX
	CMP	EDX,16
	JLE	L73
	ADD	DWORD [23520+EDI],17
	MOV	EAX,DWORD [-96+EBP]
	XOR	ECX,ECX
	XOR	ESI,ESI
	MOV	DWORD [EBX],EAX
	MOVZX	EDX,BYTE [516+EBX]
	CMP	ECX,EAX
	JGE	L75
L86:
	MOVZX	EAX,BYTE [516+ECX+EBX*1]
	CMP	EAX,EDX
	JE	L80
L102:
	CMP	ECX,DWORD [-96+EBP]
	JGE	L75
	MOV	AL,BYTE [516+ECX+EBX*1]
	MOV	BYTE [-101+EBP],AL
L82:
	INC	EDX
	ADD	ESI,ESI
	MOVZX	EAX,BYTE [-101+EBP]
	CMP	EAX,EDX
	JNE	L82
	CMP	ECX,DWORD [-96+EBP]
	JL	L86
L75:
	MOV	EAX,DWORD [-96+EBP]
	ADD	EAX,DWORD [23520+EDI]
	CMP	EAX,DWORD [23524+EDI]
	JA	L59
	XOR	ECX,ECX
	CMP	ECX,DWORD [-96+EBP]
	JGE	L104
L92:
	MOV	EAX,DWORD [23520+EDI]
	MOV	AL,BYTE [ECX+EAX*1]
	MOV	BYTE [772+ECX+EBX*1],AL
	INC	ECX
	CMP	ECX,DWORD [-96+EBP]
	JL	L92
L104:
	MOV	EAX,DWORD [-96+EBP]
	ADD	DWORD [23520+EDI],EAX
	MOV	EAX,DWORD [-100+EBP]
	SUB	EAX,DWORD [-96+EBP]
	SUB	EAX,18
	MOV	DWORD [-100+EBP],EAX
	TEST	EAX,EAX
	JG	L93
L95:
	XOR	EAX,EAX
L57:
	ADD	ESP,92
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L59:
	MOV	EAX,DWORD [23524+EDI]
	MOV	DWORD [23520+EDI],EAX
	MOV	EAX,1
	JMP	L57
L80:
	MOV	WORD [4+EBX+ECX*2],SI
	INC	ECX
	INC	ESI
	MOVZX	EAX,BYTE [516+ECX+EBX*1]
	CMP	EAX,EDX
	JE	L80
	JMP	L102
	GLOBAL	_jpeg_init
_jpeg_init:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	EDI
	MOV	EBX,DWORD [8+EBP]
	MOV	DWORD [-16+EBP],0
	MOV	DWORD [EBX],0
	MOV	DWORD [16568+EBX],0
	MOV	DWORD [16572+EBX],0
	MOV	DWORD [16576+EBX],0
	MOV	DWORD [17348+EBX],0
	MOV	DWORD [16+EBX],0
	MOV	DWORD [20+EBX],0
	MOV	DWORD [23532+EBX],0
	MOV	DWORD [23528+EBX],0
	MOV	DWORD [164+EBX],0
L106:
	MOV	EDX,DWORD [23520+EBX]
	MOV	ESI,DWORD [23524+EBX]
	LEA	ECX,DWORD [2+EDX]
	CMP	ECX,ESI
	JA	L110
	CMP	BYTE [EDX],-1
	JNE	L112
	MOV	AL,BYTE [1+EDX]
	MOV	DWORD [23520+EBX],ECX
	CMP	AL,-40
	JE	L106
	CMP	AL,-39
	JE	L110
	CMP	AL,-64
	JE	L138
	CMP	AL,-60
	JE	L139
	CMP	AL,-37
	JE	L140
	CMP	AL,-35
	JE	L141
	CMP	AL,-38
	JE	L142
	LEA	EAX,DWORD [4+EDX]
	CMP	EAX,ESI
	JA	L110
	MOVZX	EAX,BYTE [2+EDX]
	SAL	EAX,8
	MOVZX	EDX,BYTE [1+ECX]
	OR	EAX,EDX
	LEA	EAX,DWORD [EAX+ECX*1]
	MOV	DWORD [23520+EBX],EAX
	JMP	L106
L110:
	MOV	DWORD [23520+EBX],ESI
L112:
	MOV	DWORD [-16+EBP],1
L132:
	MOV	EAX,DWORD [-16+EBP]
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L142:
	LEA	EAX,DWORD [5+EDX]
	CMP	EAX,ESI
	JA	L110
	MOVZX	EDX,BYTE [2+ECX]
	MOV	DWORD [23520+EBX],EAX
	MOV	DWORD [88+EBX],EDX
	LEA	EAX,DWORD [EAX+EDX*2]
	CMP	EAX,ESI
	JA	L110
	XOR	ECX,ECX
	CMP	ECX,EDX
	JGE	L136
	MOV	ESI,EDX
L131:
	MOV	EDX,DWORD [23520+EBX]
	MOVZX	EAX,BYTE [EDX]
	MOV	DWORD [92+EBX+ECX*4],EAX
	MOV	AL,BYTE [1+EDX]
	SHR	AL,4
	MOVZX	EAX,AL
	MOV	DWORD [116+EBX+ECX*4],EAX
	MOV	AL,BYTE [1+EDX]
	ADD	EDX,2
	AND	EAX,15
	MOV	DWORD [23520+EBX],EDX
	MOVZX	EAX,AL
	MOV	DWORD [104+EBX+ECX*4],EAX
	INC	ECX
	CMP	ECX,ESI
	JL	L131
L136:
	ADD	DWORD [23520+EBX],3
	JMP	L132
L141:
	LEA	EDI,DWORD [6+EDX]
	CMP	EDI,ESI
	JA	L110
	MOVZX	EAX,BYTE [2+ECX]
	MOVZX	EDX,BYTE [3+ECX]
	SAL	EAX,8
	MOV	DWORD [23520+EBX],EDI
	OR	EAX,EDX
	MOV	DWORD [164+EBX],EAX
	JMP	L106
L140:
	PUSH	EBX
	CALL	_jpeg_dqt
L137:
	POP	ESI
	JMP	L106
L139:
	PUSH	EBX
	CALL	_jpeg_dht
	JMP	L137
L138:
	PUSH	EBX
	CALL	_jpeg_sof
	JMP	L137
	GLOBAL	_jpeg_decode_init
_jpeg_decode_init:
	PUSH	EBP
	XOR	EDX,EDX
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	MOV	EBX,DWORD [8+EBP]
	MOV	EDI,DWORD [88+EBX]
	CMP	EDX,EDI
	JGE	L166
L154:
	XOR	ECX,ECX
	MOV	ESI,DWORD [24+EBX]
	CMP	ECX,ESI
	JGE	L146
L153:
	MOV	EAX,DWORD [28+EBX+ECX*4]
	CMP	DWORD [92+EBX+EDX*4],EAX
	JE	L172
	INC	ECX
	CMP	ECX,ESI
	JL	L153
L146:
	INC	EDX
	CMP	EDX,EDI
	JL	L154
L166:
	MOV	EAX,DWORD [16+EBX]
	XOR	EDX,EDX
	SAL	EAX,3
	MOV	DWORD [8+EBX],EAX
	MOV	EAX,DWORD [20+EBX]
	SAL	EAX,3
	MOV	DWORD [12+EBX],EAX
L159:
	MOV	DWORD [168+EBX+EDX*4],128
	INC	EDX
	CMP	EDX,4095
	JLE	L159
	XOR	EDX,EDX
	MOV	ECX,DWORD [88+EBX]
	CMP	EDX,ECX
	JGE	L171
	LEA	EAX,DWORD [168+EBX]
L164:
	MOV	DWORD [16552+EBX+EDX*4],EAX
	INC	EDX
	ADD	EAX,4096
	CMP	EDX,ECX
	JL	L164
L171:
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L172:
	MOV	EAX,DWORD [52+EBX+ECX*4]
	MOV	DWORD [128+EBX+EDX*4],EAX
	MOV	EAX,DWORD [64+EBX+ECX*4]
	MOV	DWORD [140+EBX+EDX*4],EAX
	MOV	EAX,DWORD [76+EBX+ECX*4]
	MOV	DWORD [152+EBX+EDX*4],EAX
	JMP	L146
	GLOBAL	_jpeg_huff_decode
_jpeg_huff_decode:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	XOR	EDI,EDI
	PUSH	EBX
	XOR	ESI,ESI
	PUSH	EBX
	MOV	EAX,DWORD [12+EBP]
	MOV	EDX,DWORD [16+EBP]
	IMUL	EAX,EAX,3084
	IMUL	EDX,EDX,1028
	ADD	EAX,DWORD [8+EBP]
	MOV	DWORD [-16+EBP],0
	LEA	EBX,DWORD [17352+EDX+EAX*1]
L183:
	PUSH	1
	INC	EDI
	PUSH	DWORD [8+EBP]
	CALL	_get_bits
	POP	EDX
	SAL	DWORD [-16+EBP],1
	MOVZX	EAX,AX
	POP	ECX
	OR	DWORD [-16+EBP],EAX
	MOVZX	EAX,BYTE [516+ESI+EBX*1]
	CMP	EAX,EDI
	JE	L182
L187:
	CMP	EDI,15
	JLE	L183
	OR	EAX,-1
L173:
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L182:
	MOVZX	EAX,WORD [4+EBX+ESI*2]
	CMP	EAX,DWORD [-16+EBP]
	JE	L188
	INC	ESI
	MOVZX	EAX,BYTE [516+ESI+EBX*1]
	CMP	EAX,EDI
	JE	L182
	JMP	L187
L188:
	MOVZX	EAX,BYTE [772+ESI+EBX*1]
	JMP	L173
	GLOBAL	_jpeg_idct_init
_jpeg_idct_init:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	XOR	ESI,ESI
	PUSH	EBX
	SUB	ESP,216
	MOV	DWORD [-204+EBP],32768
	MOV	DWORD [-200+EBP],32138
	MOV	DWORD [-196+EBP],30274
	MOV	DWORD [-192+EBP],27246
	MOV	DWORD [-188+EBP],23170
	MOV	DWORD [-184+EBP],18205
	MOV	DWORD [-180+EBP],12540
	MOV	DWORD [-176+EBP],6393
	MOV	DWORD [-172+EBP],0
	MOV	DWORD [-168+EBP],-6393
	MOV	DWORD [-164+EBP],-12540
	MOV	DWORD [-160+EBP],-18205
	MOV	DWORD [-156+EBP],-23170
	MOV	DWORD [-152+EBP],-27246
	MOV	DWORD [-148+EBP],-30274
	MOV	DWORD [-144+EBP],-32138
L194:
	MOV	EAX,DWORD [-204+EBP+ESI*4]
	NEG	EAX
	MOV	DWORD [-140+EBP+ESI*4],EAX
	INC	ESI
	CMP	ESI,15
	JLE	L194
	XOR	ESI,ESI
	MOV	DWORD [-216+EBP],0
L226:
	MOV	ECX,ESI
	MOV	EDX,ESI
	ADD	ECX,ECX
	JNE	L199
	MOV	EDX,4
L199:
	XOR	EBX,EBX
L204:
	MOV	EAX,DWORD [-204+EBP+EDX*4]
	ADD	EDX,ECX
	MOV	DWORD [-44+EBP+EBX*4],EAX
	AND	EDX,31
	INC	EBX
	CMP	EBX,7
	JLE	L204
	MOV	EAX,DWORD [-216+EBP]
	SAL	EAX,3
	MOV	DWORD [-208+EBP],0
	MOV	DWORD [-228+EBP],EAX
L225:
	MOV	EDX,DWORD [-208+EBP]
	MOV	EBX,EDX
	ADD	EBX,EBX
	JNE	L209
	MOV	EDX,4
L209:
	XOR	ECX,ECX
L214:
	MOV	EAX,DWORD [-204+EBP+EDX*4]
	ADD	EDX,EBX
	MOV	DWORD [-76+EBP+ECX*4],EAX
	AND	EDX,31
	INC	ECX
	CMP	ECX,7
	JLE	L214
	XOR	EBX,EBX
L224:
	MOV	EDX,DWORD [-44+EBP+EBX*4]
	XOR	ECX,ECX
	MOV	DWORD [-212+EBP],EDX
L223:
	MOV	EDI,DWORD [-212+EBP]
	MOV	EDX,DWORD [-228+EBP]
	IMUL	EDI,DWORD [-76+EBP+ECX*4]
	SAR	EDI,15
	ADD	EDX,EBX
	MOV	EAX,DWORD [8+EBP]
	LEA	EDX,DWORD [ECX+EDX*8]
	INC	ECX
	CMP	ECX,7
	MOV	DWORD [EAX+EDX*4],EDI
	JLE	L223
	INC	EBX
	CMP	EBX,7
	JLE	L224
	INC	DWORD [-208+EBP]
	ADD	DWORD [-228+EBP],8
	CMP	DWORD [-208+EBP],7
	JLE	L225
	INC	ESI
	ADD	DWORD [-216+EBP],8
	CMP	ESI,7
	JLE	L226
	ADD	ESP,216
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
	GLOBAL	_jpeg_idct
_jpeg_idct:
	PUSH	EBP
	XOR	EDX,EDX
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	EAX
	PUSH	EAX
L246:
	MOV	EAX,DWORD [12+EBP]
	MOV	DWORD [EAX+EDX*4],0
	INC	EDX
	CMP	EDX,63
	JLE	L246
	XOR	EDX,EDX
	XOR	EDI,EDI
L257:
	MOV	ESI,DWORD [8+EBP]
	MOV	ESI,DWORD [ESI+EDX*4]
	MOV	DWORD [-20+EBP],ESI
	TEST	ESI,ESI
	JE	L249
	MOV	EAX,DWORD [16+EBP]
	XOR	EBX,EBX
	LEA	ECX,DWORD [EAX+EDI*4]
L256:
	MOV	ESI,DWORD [-20+EBP]
	MOV	EAX,DWORD [12+EBP]
	IMUL	ESI,DWORD [ECX]
	ADD	DWORD [EAX+EBX*4],ESI
	ADD	ECX,4
	INC	EBX
	CMP	EBX,63
	JLE	L256
L249:
	INC	EDX
	ADD	EDI,64
	CMP	EDX,63
	JLE	L257
	XOR	EDX,EDX
L262:
	MOV	ESI,DWORD [12+EBP]
	SAR	DWORD [ESI+EDX*4],17
	INC	EDX
	CMP	EDX,63
	JLE	L262
	POP	ESI
	POP	EDI
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
	GLOBAL	_jpeg_get_value
_jpeg_get_value:
	PUSH	EBP
	XOR	EDX,EDX
	MOV	EBP,ESP
	PUSH	EBX
	MOV	EBX,DWORD [12+EBP]
	TEST	EBX,EBX
	JNE	L275
L271:
	MOV	EAX,EDX
	MOV	EBX,DWORD [-4+EBP]
	LEAVE
	RET
L275:
	PUSH	EBX
	PUSH	DWORD [8+EBP]
	CALL	_get_bits
	MOVZX	EDX,AX
	POP	EAX
	MOV	EAX,EDX
	POP	ECX
	LEA	ECX,DWORD [-1+EBX]
	SAR	EAX,CL
	AND	EAX,1
	JNE	L271
	MOV	EAX,1
	MOV	CL,BL
	SAL	EAX,CL
	SUB	EDX,EAX
	LEA	EDX,DWORD [1+EDX]
	JMP	L271
	GLOBAL	_jpeg_decode_huff
_jpeg_decode_huff:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	EAX
	MOV	EDI,DWORD [8+EBP]
	MOV	EDX,DWORD [12+EBP]
	MOV	EAX,DWORD [152+EDI+EDX*4]
	SAL	EAX,8
	PUSH	DWORD [116+EDI+EDX*4]
	LEA	EBX,DWORD [EAX+EDI*1]
	PUSH	0
	PUSH	EDI
	LEA	ECX,DWORD [16580+EBX]
	MOV	DWORD [-16+EBP],ECX
	CALL	_jpeg_huff_decode
	ADD	ESP,12
	XOR	EDX,EDX
	TEST	EAX,EAX
	JS	L276
	PUSH	EAX
	MOV	ESI,1
	PUSH	EDI
	CALL	_jpeg_get_value
	MOV	ECX,DWORD [16+EBP]
	MOV	EDX,DWORD [12+EBP]
	ADD	EAX,DWORD [16568+EDI+EDX*4]
	MOV	DWORD [16568+EDI+EDX*4],EAX
	IMUL	EAX,DWORD [16580+EBX]
	MOV	DWORD [ECX],EAX
	POP	EBX
	POP	EAX
L288:
	MOV	EAX,DWORD [12+EBP]
	PUSH	DWORD [104+EDI+EAX*4]
	PUSH	1
	PUSH	EDI
	CALL	_jpeg_huff_decode
	ADD	ESP,12
	TEST	EAX,EAX
	JS	L279
	TEST	EAX,EAX
	JE	L279
	MOV	EBX,EAX
	AND	EAX,15
	SAR	EBX,4
	PUSH	EAX
	PUSH	EDI
	AND	EBX,15
	CALL	_jpeg_get_value
	MOV	EDX,EAX
	POP	EAX
	POP	ECX
	CMP	EDX,65535
	JG	L276
	MOV	EAX,EBX
	DEC	EBX
	TEST	EAX,EAX
	JLE	L295
L287:
	MOV	ECX,DWORD [20+EBP]
	MOVZX	EAX,BYTE [ESI+ECX*1]
	MOV	ECX,DWORD [16+EBP]
	INC	ESI
	MOV	DWORD [ECX+EAX*4],0
	MOV	EAX,EBX
	DEC	EBX
	TEST	EAX,EAX
	JG	L287
L295:
	MOV	ECX,DWORD [20+EBP]
	MOVZX	EAX,BYTE [ESI+ECX*1]
	MOV	ECX,DWORD [-16+EBP]
	IMUL	EDX,DWORD [ECX+ESI*4]
	MOV	ECX,DWORD [16+EBP]
	INC	ESI
	CMP	ESI,63
	MOV	DWORD [ECX+EAX*4],EDX
	JLE	L288
L297:
	XOR	EDX,EDX
L276:
	LEA	ESP,DWORD [-12+EBP]
	MOV	EAX,EDX
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L279:
	CMP	ESI,63
	JG	L297
L292:
	MOV	EDX,DWORD [20+EBP]
	MOV	ECX,DWORD [16+EBP]
	MOVZX	EAX,BYTE [ESI+EDX*1]
	INC	ESI
	MOV	DWORD [ECX+EAX*4],0
	CMP	ESI,63
	JLE	L292
	JMP	L297
	GLOBAL	_jpeg_mcu_bitblt
_jpeg_mcu_bitblt:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,16
	MOV	EAX,DWORD [24+EBP]
	MOV	EDX,DWORD [20+EBP]
	MOV	ESI,DWORD [28+EBP]
	SUB	DWORD [32+EBP],EAX
	SUB	ESI,EDX
	IMUL	EAX,DWORD [16+EBP]
	ADD	EAX,EDX
	SUB	DWORD [16+EBP],ESI
	LEA	EBX,DWORD [0+EAX*4]
	ADD	EBX,DWORD [12+EBP]
	CMP	DWORD [32+EBP],0
	JLE	L311
	MOV	DWORD [-24+EBP],0
	MOV	EDI,DWORD [32+EBP]
L309:
	MOV	EAX,DWORD [-24+EBP]
	CDQ
	IDIV	DWORD [32+EBP]
	MOV	ECX,EAX
	SAL	ECX,3
	TEST	ESI,ESI
	MOV	DWORD [-16+EBP],ECX
	JLE	L313
	MOV	DWORD [-20+EBP],0
	MOV	ECX,ESI
L308:
	MOV	EAX,DWORD [-20+EBP]
	CDQ
	IDIV	ESI
	MOV	DWORD [-28+EBP],EAX
	MOV	EDX,DWORD [8+EBP]
	ADD	EAX,DWORD [-16+EBP]
	ADD	DWORD [-20+EBP],8
	MOV	EAX,DWORD [EDX+EAX*4]
	MOV	DWORD [EBX],EAX
	ADD	EBX,4
	DEC	ECX
	JNE	L308
L313:
	MOV	ECX,DWORD [16+EBP]
	ADD	DWORD [-24+EBP],8
	DEC	EDI
	LEA	EBX,DWORD [EBX+ECX*4]
	JNE	L309
L311:
	ADD	ESP,16
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
	GLOBAL	_jpeg_decode_mcu
_jpeg_decode_mcu:
	PUSH	EBP
	XOR	EAX,EAX
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,548
	MOV	EDX,DWORD [8+EBP]
	MOV	DWORD [-528+EBP],0
	CMP	EAX,DWORD [88+EDX]
	JGE	L331
	ADD	EDX,168
	MOV	DWORD [-560+EBP],EDX
L329:
	MOV	EAX,DWORD [-528+EBP]
	MOV	EDX,DWORD [8+EBP]
	MOV	DWORD [-536+EBP],0
	MOV	EDI,DWORD [140+EDX+EAX*4]
	MOV	ESI,DWORD [128+EDX+EAX*4]
	CMP	DWORD [-536+EBP],EDI
	JGE	L333
L328:
	MOV	DWORD [-532+EBP],0
	CMP	DWORD [-532+EBP],ESI
	JL	L327
L335:
	INC	DWORD [-536+EBP]
	CMP	DWORD [-536+EBP],EDI
	JL	L328
L333:
	MOV	EAX,DWORD [8+EBP]
	INC	DWORD [-528+EBP]
	MOV	EDX,DWORD [-528+EBP]
	ADD	DWORD [-560+EBP],4096
	CMP	EDX,DWORD [88+EAX]
	JL	L329
L331:
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L327:
	PUSH	DWORD [12+EBP]
	LEA	EBX,DWORD [-268+EBP]
	PUSH	EBX
	PUSH	DWORD [-528+EBP]
	PUSH	DWORD [8+EBP]
	CALL	_jpeg_decode_huff
	MOV	EAX,DWORD [8+EBP]
	ADD	EAX,23540
	PUSH	EAX
	LEA	EAX,DWORD [-524+EBP]
	PUSH	EAX
	PUSH	EBX
	CALL	_jpeg_idct
	MOV	EBX,DWORD [-532+EBP]
	MOV	EDX,DWORD [8+EBP]
	MOV	EAX,DWORD [-536+EBP]
	INC	EAX
	INC	EBX
	MOV	EDX,DWORD [12+EDX]
	IMUL	EAX,EDX
	MOV	DWORD [-540+EBP],EDX
	CDQ
	IDIV	EDI
	PUSH	EAX
	MOV	EAX,DWORD [8+EBP]
	MOV	ECX,DWORD [8+EAX]
	MOV	EAX,ECX
	IMUL	EAX,EBX
	CDQ
	IDIV	ESI
	PUSH	EAX
	MOV	EAX,DWORD [-540+EBP]
	IMUL	EAX,DWORD [-536+EBP]
	CDQ
	MOV	DWORD [-540+EBP],EAX
	IDIV	EDI
	PUSH	EAX
	MOV	DWORD [-548+EBP],EAX
	MOV	EAX,DWORD [-532+EBP]
	IMUL	EAX,ECX
	CDQ
	IDIV	ESI
	PUSH	EAX
	LEA	EAX,DWORD [-524+EBP]
	PUSH	ECX
	PUSH	DWORD [-560+EBP]
	PUSH	EAX
	CALL	_jpeg_mcu_bitblt
	MOV	DWORD [-532+EBP],EBX
	ADD	ESP,56
	CMP	EBX,ESI
	JL	L327
	JMP	L335
	GLOBAL	_jpeg_decode_yuv
_jpeg_decode_yuv:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,24
	MOV	ECX,DWORD [8+EBP]
	MOV	EAX,DWORD [8+ECX]
	MOV	ESI,DWORD [12+ECX]
	MOV	DWORD [-32+EBP],EAX
	MOV	EAX,DWORD [16+ECX]
	IMUL	EAX,DWORD [12+EBP]
	LEA	EDI,DWORD [0+EAX*8]
	MOV	EAX,DWORD [20+ECX]
	IMUL	EAX,DWORD [16+EBP]
	LEA	EDX,DWORD [0+EAX*8]
	MOV	EAX,DWORD [ECX]
	SUB	EAX,EDI
	MOV	DWORD [-24+EBP],EAX
	MOV	EAX,DWORD [-32+EBP]
	CMP	DWORD [-24+EBP],EAX
	JLE	L337
	MOV	DWORD [-24+EBP],EAX
L337:
	MOV	EBX,DWORD [4+ECX]
	SUB	EBX,EDX
	CMP	EBX,ESI
	JLE	L338
	MOV	EBX,ESI
L338:
	LEA	EAX,DWORD [168+ECX]
	MOV	DWORD [-28+EBP],EAX
	MOV	EAX,DWORD [23536+ECX]
	IMUL	EDX,EAX
	MOV	ECX,DWORD [24+EBP]
	ADD	EDX,EDI
	SUB	EAX,DWORD [-24+EBP]
	AND	ECX,127
	IMUL	EDX,ECX
	IMUL	ECX,EAX
	ADD	DWORD [20+EBP],EDX
	MOV	DWORD [-36+EBP],ECX
	TEST	EBX,EBX
	JLE	L356
	MOV	DWORD [-20+EBP],EBX
L354:
	CMP	DWORD [-24+EBP],0
	JLE	L358
	MOV	EDX,DWORD [-24+EBP]
	MOV	DWORD [-16+EBP],EDX
L353:
	MOV	ECX,DWORD [-28+EBP]
	MOV	EDI,DWORD [ECX]
	MOV	ESI,DWORD [8192+ECX]
	SAL	EDI,12
	LEA	EAX,DWORD [0+ESI*4]
	MOV	EDX,EDI
	SUB	EDX,EAX
	MOV	EAX,EDX
	MOV	EDX,DWORD [4096+ECX]
	IMUL	EDX,EDX,7257
	ADD	EAX,EDX
	SAR	EAX,12
	LEA	EBX,DWORD [128+EAX]
	TEST	EBX,-256
	JE	L347
	NOT	EBX
	SAR	EBX,24
L347:
	MOV	EAX,ESI
	MOV	ECX,EDI
	IMUL	EAX,EAX,2924
	SUB	ECX,EAX
	MOV	EAX,ECX
	SAR	EAX,12
	LEA	ECX,DWORD [128+EAX]
	TEST	ECX,-256
	JE	L348
	NOT	ECX
	SAR	ECX,24
L348:
	IMUL	ESI,ESI,5742
	LEA	EAX,DWORD [ESI+EDI*1]
	SAR	EAX,12
	LEA	EDX,DWORD [128+EAX]
	TEST	EDX,-256
	JE	L349
	NOT	EDX
	SAR	EDX,24
L349:
	CMP	DWORD [24+EBP],4
	JE	L359
	CMP	DWORD [24+EBP],2
	JE	L360
L345:
	DEC	DWORD [-16+EBP]
	JNE	L353
L358:
	MOV	EAX,DWORD [-32+EBP]
	MOV	ECX,DWORD [-28+EBP]
	SUB	EAX,DWORD [-24+EBP]
	LEA	ECX,DWORD [ECX+EAX*4]
	MOV	EAX,DWORD [-36+EBP]
	ADD	DWORD [20+EBP],EAX
	MOV	DWORD [-28+EBP],ECX
	DEC	DWORD [-20+EBP]
	JNE	L354
L356:
	ADD	ESP,24
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L360:
	SAL	EDX,8
	LEA	EAX,DWORD [0+ECX*8]
	AND	EDX,63488
	AND	EBX,255
	SAR	EBX,3
	AND	EAX,2016
	OR	EAX,EDX
	MOV	EDX,DWORD [20+EBP]
	OR	EAX,EBX
	MOV	WORD [EDX],AX
	ADD	EDX,2
	MOV	DWORD [20+EBP],EDX
	JMP	L345
L359:
	MOV	EAX,DWORD [20+EBP]
	MOV	BYTE [EAX],BL
	MOV	BYTE [1+EAX],CL
	MOV	BYTE [2+EAX],DL
	ADD	EAX,4
	ADD	DWORD [-28+EBP],4
	MOV	DWORD [20+EBP],EAX
	JMP	L345
	GLOBAL	_jpeg_decode
_jpeg_decode:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	XOR	EDI,EDI
	PUSH	EBX
	SUB	ESP,76
	MOV	EBX,DWORD [8+EBP]
	PUSH	EBX
	MOV	DWORD [-76+EBP],268960000
	MOV	DWORD [-72+EBP],167969289
	MOV	DWORD [-68+EBP],421533713
	MOV	DWORD [-64+EBP],84151058
	MOV	DWORD [-60+EBP],555356940
	MOV	DWORD [-56+EBP],573124648
	MOV	DWORD [-52+EBP],101520411
	MOV	DWORD [-48+EBP],471141895
	MOV	DWORD [-44+EBP],942746147
	MOV	DWORD [-40+EBP],606810681
	MOV	DWORD [-36+EBP],386864669
	MOV	DWORD [-32+EBP],858531102
	MOV	DWORD [-28+EBP],758397754
	MOV	DWORD [-24+EBP],774315814
	MOV	DWORD [-20+EBP],909982773
	MOV	DWORD [-16+EBP],1061041967
	CALL	_jpeg_decode_init
	MOV	EAX,DWORD [EBX]
	MOV	EDX,DWORD [8+EBX]
	ADD	EAX,EDX
	MOV	ESI,EDX
	MOV	DWORD [-80+EBP],0
	LEA	ECX,DWORD [-1+EAX]
	MOV	EAX,ECX
	CDQ
	IDIV	ESI
	MOV	EDX,DWORD [12+EBX]
	MOV	DWORD [-84+EBP],EAX
	MOV	EAX,DWORD [4+EBX]
	MOV	ESI,EDX
	ADD	EAX,EDX
	LEA	ECX,DWORD [-1+EAX]
	MOV	EAX,ECX
	CDQ
	IDIV	ESI
	POP	EDX
	MOV	DWORD [-88+EBP],EAX
	CMP	EDI,EAX
	JGE	L374
L372:
	XOR	ESI,ESI
	CMP	ESI,DWORD [-84+EBP]
	JL	L371
L376:
	INC	EDI
	CMP	EDI,DWORD [-88+EBP]
	JL	L372
L374:
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L371:
	LEA	EAX,DWORD [-76+EBP]
	INC	DWORD [-80+EBP]
	PUSH	EAX
	PUSH	EBX
	CALL	_jpeg_decode_mcu
	MOV	EAX,DWORD [16+EBP]
	AND	EAX,32767
	PUSH	EAX
	PUSH	DWORD [12+EBP]
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	CALL	_jpeg_decode_yuv
	ADD	ESP,28
	MOV	EAX,DWORD [164+EBX]
	TEST	EAX,EAX
	JLE	L368
	CMP	DWORD [-80+EBP],EAX
	JL	L368
	MOV	EAX,DWORD [23532+EBX]
	AND	EAX,-8
	SUB	EAX,8
	MOV	DWORD [23532+EBX],EAX
	MOV	DWORD [16568+EBX],0
	MOV	DWORD [16572+EBX],0
	MOV	DWORD [16576+EBX],0
	MOV	DWORD [-80+EBP],0
L368:
	INC	ESI
	CMP	ESI,DWORD [-84+EBP]
	JL	L371
	JMP	L376
